﻿#ifndef QLIB_HEADER_TRAPEZOID
#define QLIB_HEADER_TRAPEZOID

#include <memory>
#include "qlib/core/object.h"
#include "qlib/core/vec2.h"
#include "qlib/layout/property.h"
#include "qlib/layout/repetition.h"

namespace qlib {
class Trapezoid;
using TrapezoidPtrArray = std::vector<std::shared_ptr<Trapezoid>>;

class QLIB_API Trapezoid : public Object<Trapezoid> {
 public:
  Trapezoid();
  ~Trapezoid();

  s_ptr copy() const override;

  void init(const Vec2d& _position, double _width, double _height, uint32_t _layer = 0, uint32_t _datatype = 0);
  void init(const Vec2d& _left_bottom, const Vec2d& _right_top, uint32_t _layer = 0, uint32_t _datatype = 0);

  uint32_t layer;
  uint32_t datatype;

  Vec2d position;
  double width;
  double height;

  PropertyArray properties;
  Repetition repetition;
};

}  // namespace qlib

#endif